package com.pattern.flyweight_pattern;

/**
 * Created by chen on 2018/3/26.
 * <p>
 * Email 122741482@qq.com
 * <p>
 * Describe:
 */
public class ColorCache implements Color {

    private String name;

    public ColorCache(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void print() {
        System.out.println("颜色是" + name);
    }
}
